import {request} from '../request'
import {get} from '../get'

export const getCategory = () => {
  return get.get('/category')
}

export const getSystemUnit = () => {
  return get.get('/category/system/unit')
}

export const getSystemUnitById = (id) => {
  return get.get(`/category/system/unit/${id}`)
}

export const addSystemUnit = (systemUnitName) => {
  return request.post('/category/system/unit', {
    name: systemUnitName
  })
}

export const updateSystemUnit = (metaSystemUnitId) => {
  return request.put(`/category/user/${metaSystemUnitId}`)
}

export const updateMetaSystemUnitValue = (list) => {
  return request.put('/category/system/unit', list)
}
